package site.syksy.qingzhou.setting.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.List;
import java.util.Map;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * @author Raspberry
 * @since 2021-01-04
 */
@Data
@TableName("s_setting_dic_item_tree")
public class DicItemTreeDO implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    @TableField
    private String nextId;

    @TableField
    private String parentId;

    @NotBlank
    @TableField
    private String dicId;

    @Schema(title = "层级ID")
    @TableField(exist = false)
    private List<String> levelIds;

    @Schema(title = "层级")
    @TableField(exist = false)
    private Map<String,String> level;

    @NotBlank
    @TableField
    private String name;

    @NotBlank
    @TableField
    private String code;

    @TableField
    private String customize;

    private Boolean fixed;

    /**
     * 子级
     */
    @TableField(exist = false)
    private List<DicItemTreeDO> children;

    /**
     * 是否展开
     */
    @TableField("is_expand")
    private Boolean expand;

}
